﻿using System;
using System.Security.Principal;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using System.Web.Security;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MVCBugTracker;
using MVCBugTracker.Controllers;
using MVCBugTracker.Models;

namespace MVCBugTracker.Tests.Mocks
{
    public  class MockFormsAuthenticationService : IFormsAuthenticationService
    {
        public bool SignIn_WasCalled;
        public bool SignOut_WasCalled;

        public void SignIn(string userName, bool createPersistentCookie)
        {
            // verify that the arguments are what we expected
            Assert.AreEqual("someUser", userName);
            Assert.IsFalse(createPersistentCookie);

            SignIn_WasCalled = true;
        }

        public void SignOut()
        {
            SignOut_WasCalled = true;
        }
    }
}
